home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbnws102.zip / QEXEC.ZIP / ASK.BAS next >
BASIC Source File  |  1990-02-02  |  264b  |  12 lines

  1. DEFINT A-Z
  2. '$INCLUDE: 'PDQDECL.BAS'
  3.  
  4.  
  5. PRINT "Enter a number (0-9): ";
  6. DO                      'wait until a number key is pressed
  7.    Ask = BIOSInkey
  8. LOOP WHILE Ask < 48 OR Ask > 57
  9.  
  10. PRINT
  11. EndLevel (Ask - 48)     'adjust ASCII to a valid number and exit
  12.